#@edit()
#define content()
<!-- form start -->
<form class="form-horizontal" action="/middleman/save" method="post">
    <div class="box-body">
        <div class="form-group">
            <label class="col-sm-2 control-label">代理商ID</label>
            <div class="col-sm-10">
               	<input type="text" name="top_agent_id" class="form-control input-sm" placeholder="代理商ID" value="#(itemData.top_agent_id??)" #(null==itemData?"":"disabled='true'") />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">公司名称</label>
            <div class="col-sm-10">
                <input type="text" name="nickname" class="form-control input-sm" placeholder="公司名称" value="#(itemData.nickname??)" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">电子邮件</label>
            <div class="col-sm-10">
                <input type="email" name="email" class="form-control input-sm" placeholder="电子邮件" value="#(itemData.email??)" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">性别</label>
            <div class="col-sm-10">
                <label class="radio-inline"><input type="radio" name="sex" value="1" data-value="#(itemData.sex??)" checked="checked" > 男</label>
                <label class="radio-inline"><input type="radio" name="sex" value="2" data-value="#(itemData.sex??)"> 女</label>
                <label class="radio-inline"><input type="radio" name="sex" value="0" data-value="#(itemData.sex??)"> 未知</label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">代理注册模式</label>
            <div class="col-sm-10">
                <label class="radio-inline"><input type="radio" name="is_free_regist_agent" value="0" data-value="#(itemData.is_free_regist_agent??)"> 免费注册</label>
                <label class="radio-inline"><input type="radio" name="is_free_regist_agent" value="1" data-value="#(itemData.is_free_regist_agent??)" checked="checked" > 付费注册</label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">手机号码</label>
            <div class="col-sm-10">
                <input type="text" name="mobile" class="form-control input-sm" placeholder="手机号码" value="#(itemData.mobile??)" />
            </div>
        </div>
    </div>
    #if((itemData.user_id??0) > 0)
    <input type="hidden" name="user_id" value="#(itemData.user_id??)" />
    #end
    <!-- /.box-body -->
    <div class="box-footer">
        <button type="button" class="btn btn-default xsui-btn-close-dialog">取消</button>
        <button type="submit" class="btn btn-primary pull-right">保存</button>
    </div>
    <!-- /.box-footer -->
    #(token??)
</form>
#end
#define script_after()
<script>

    xsApp.xsfnTogglePassword();
    xsApp.xsfnCheckRadio('[name="sex"]');
    xsApp.xsfnCheckRadio('[name="is_free_regist_agent"]');
</script>
#end